<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    var obj = {
        age:18,
        wife:{
            name:"冬雨"
        }
    }

    //第一个name:匹配模式
    //第二个name:真正的变量名
    /*var {name:damuname="达姆",age:damuage,wife:{name:wifename}} = obj;
    console.log(damuname, damuage,wifename);*/

    var name = obj.name || "xxx"
    var age = obj.age || 19

    console.log(name,age)
</script>
</html>